import ajax from '@/utils/ajax'
import util from '@/utils/index'
export default function (query) {
  return ajax({
    url: `/a/wx/h5/pay?${util.objectToString(query)}`,
    loading: true,
    data: query
  }).then(({code, data, msg}) => {
    if (code === 1) {
      return data
    } else {
      throw msg
    }
  })
}
